/**
 * Created by Administrator on 2016/10/25 0025.
 */
window.onload = function() {
    console.log("3");
    var showMenu = function(x, y){
        console.log("1");
        menu.style.left = x + 'px';
        menu.style.top = y + 'px';
        menu.classList.add('show-menu');
    };
    var menu = document.querySelector('.menu');
    var $content = $('.fc-content');
    $content.bind('contextmenu', function(e) {
            if(e.which == 3) {
                console.log("2");
                e.preventDefault();
                showMenu(e.pageX, e.pageY);
                $(this).bind('mousedown', function(e) {
                    menu.classList.remove('show-menu');
                });
            }
        }
    );

};